home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug191 / soundtst.c < prev    next >
Text File  |  1986-05-25  |  2KB  |  54 lines

  1.  
  2. #include "sound.h"
  3.  
  4. /* ------------------------------------------------------------ */
  5. /*      This is a portion of the SOUND EFFECTS LIBRARY.         */
  6. /*                                                              */
  7. /*      Copyright (C) 1986 by Paul Canniff.                     */
  8. /*      All rights reserved.                                    */
  9. /*                                                              */
  10. /*      This library has been placed into the public domain     */
  11. /*      by the author.  Use is granted for non-commercial       */
  12. /*      pusposes, or as an IMBEDDED PORTION of a commercial     */
  13. /*      product.                                                */
  14. /*                                                              */
  15. /*      Paul Canniff                                            */
  16. /*      PO Box 1056                                             */
  17. /*      Marlton, NJ 08053                                       */
  18. /*                                                              */
  19. /*      CompuServe ID: 73047,3715                               */
  20. /*                                                              */
  21. /* ------------------------------------------------------------ */
  22.  
  23.  
  24. main()
  25. {
  26.     static char template[] = "t%d c d e f a b";
  27.     char temp[256];
  28.     long f;
  29.     int i,u,r;
  30.  
  31.     printf("SOUND_INIT returns %d\n",sound_init(4,1));
  32.  
  33.  
  34.     play("L1");
  35.     for (i=8; i<=64; i+=8)
  36.     {
  37.         sprintf(temp,template,i);
  38.         play(temp);
  39.     }
  40.  
  41.     for (f=1; f<=120; f++) 
  42.     {
  43.         sound_bchk(&u,&r);
  44.         printf("Waiting u %-3d r %-3d%c",u,r,((f & 0x3) == 0) ? '\n' : ' ');
  45.     }
  46.  
  47.     sound_done();
  48.  
  49.     exit(0);
  50. }
  51.  
  52.  
  53.  
  54.